package items;

import engine.Persistent;
import engine.combat.Stats;
import engine.utils.AttributeList;

/**
 * @author Kyle_Solo
 */
public abstract class Item extends Persistent {

	private static int idMax = 0;

	// todo: Implement an inventory/item system
	/**
	 * A list of this item's attributes
	 */
	public final AttributeList attribtues;

	/**
	 * This item's unique ID. No other item will have the same ID as this one.
	 */
	public final int ID;

	/**
	 * Default constructor for Item
	 */
	public Item() {
		attribtues = new AttributeList();
	}

	{
		ID = idMax++;
	}

	@Override
	public String getSaveFilename() {
		return this.getClass().getSimpleName() + "_" + ID;
	}

	/**
	 * Applies this item's stat-modifying effect to a combatant's stats. This method should alter
	 * the stats object it is given.
	 * 
	 * @param stats
	 *            the combatant's stats object
	 */
	public abstract void modifyStats(Stats stats);
}
